version: "3"
services:
  react-app:
    image: react-app
    build: ./client/
    stdin_open: true
    ports:
      - "3000:3000"
    networks:
      - freshcode-test-app
  api-server:
    image: api-server
    build: ./server/
    ports:
      - "5000:5000"
    networks:
      - freshcode-test-app
    depends_on:
      - mongo
  mongo:
    image: mongo:4.4-bionic
    ports:
      - "27017:27017"
    networks:
      - freshcode-test-app
    volumes:
      - mongo-data:/data/db

networks:
  freshcode-test-app:
    driver: bridge
volumes:
  mongo-data:
    driver: local
